home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-SPAR.{_6 / ATOPS.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  413b  |  23 lines

  1. /* atops.h: Atomic SPARC operations.
  2.  *
  3.  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
  4.  */
  5. #ifndef _SPARC_ATOPS_H
  6. #define _SPARC_ATOPS_H
  7.  
  8. #ifdef __SMP__
  9.  
  10. extern __inline__ __volatile__ unsigned char ldstub(volatile unsigned char *lock)
  11. {
  12.     volatile unsigned char retval;
  13.  
  14.     __asm__ __volatile__("ldstub [%1], %0\n\t" :
  15.                  "=&r" (retval) :
  16.                  "r" (lock));
  17.     return retval;
  18. }
  19.  
  20. #endif
  21.  
  22. #endif
  23.